package com.application.race.manage.misc;

import com.application.item.manage.ItemManage;
import com.application.item.pojo.Item;
import com.application.race.manage.RacingRoom;
import com.application.race.manage.player.Player;

public class RacingItem {
	 private RacingRoom room;
	 public int racingItemid;
     public double x;
     public double y;
     public Item item;
     public int maxTime;
     public long ceateTime;
     public Player owner;
     public boolean valid=true;
     public RacingItem(RacingRoom room ,int itemid){
    	 this.room=room;
         item = ItemManage.getItem(itemid, "RacingItem.RacingItem");
         racingItemid=room.racingItemid++;
         ceateTime=System.currentTimeMillis();
     }
     public void update(long currentTime){
    	 if(currentTime-ceateTime>=maxTime){
    		 valid=false; 
    	 }
     }
}
